package com.xrf;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class MaterialManagement {
    private String materialNumber;
    private String materialModel;
    private Long materialType;
    private String materialName;
    private Double storageTime;
    private Double outboundTime;
    private Long leadingOfficial;
    private String accessDepartment;
    private Long recipient;

    private static List<MaterialManagement> list = new ArrayList<>();
    private static Scanner scanner = new Scanner(System.in);

    public MaterialManagement() {}

    public MaterialManagement(String materialNumber, String materialModel, Long materialType, 
                             String materialName, Double storageTime, Double outboundTime,
                             Long leadingOfficial, String accessDepartment, Long recipient) {
        this.materialNumber = materialNumber;
        this.materialModel = materialModel;
        this.materialType = materialType;
        this.materialName = materialName;
        this.storageTime = storageTime;
        this.outboundTime = outboundTime;
        this.leadingOfficial = leadingOfficial;
        this.accessDepartment = accessDepartment;
        this.recipient = recipient;
    }

    // Getter and Setter methods
    public String getMaterialNumber() { return materialNumber; }
    public void setMaterialNumber(String materialNumber) { this.materialNumber = materialNumber; }
    public String getMaterialModel() { return materialModel; }
    public void setMaterialModel(String materialModel) { this.materialModel = materialModel; }
    public Long getMaterialType() { return materialType; }
    public void setMaterialType(Long materialType) { this.materialType = materialType; }
    public String getMaterialName() { return materialName; }
    public void setMaterialName(String materialName) { this.materialName = materialName; }
    public Double getStorageTime() { return storageTime; }
    public void setStorageTime(Double storageTime) { this.storageTime = storageTime; }
    public Double getOutboundTime() { return outboundTime; }
    public void setOutboundTime(Double outboundTime) { this.outboundTime = outboundTime; }
    public Long getLeadingOfficial() { return leadingOfficial; }
    public void setLeadingOfficial(Long leadingOfficial) { this.leadingOfficial = leadingOfficial; }
    public String getAccessDepartment() { return accessDepartment; }
    public void setAccessDepartment(String accessDepartment) { this.accessDepartment = accessDepartment; }
    public Long getRecipient() { return recipient; }
    public void setRecipient(Long recipient) { this.recipient = recipient; }

    @Override
    public String toString() {
        StringBuilder builder = new StringBuilder();
        builder.append("物资编号:").append(materialNumber).append("\t");
        builder.append("物资型号:").append(materialModel).append("\t");
        builder.append("物资类型:").append(materialType).append("\t");
        builder.append("物资名称:").append(materialName).append("\t");
        builder.append("入库时间:").append(storageTime).append("\t");
        builder.append("出库时间:").append(outboundTime).append("\t");
        builder.append("负责人:").append(leadingOfficial).append("\t");
        builder.append("领用部门:").append(accessDepartment).append("\t");
        builder.append("领用人:").append(recipient).append("\t");
        return builder.toString();
    }
}